from tortoise import fields, models


class Stu_Info(models.Model):
    stu_id: int = fields.IntField(pk=True, description='学生编号')
    stu_class_name: str = fields.CharField(max_length=100, description='学生班级名称')
    stu_name: str = fields.CharField(max_length=100, description='学生姓名')
    stu_jiguan: str = fields.CharField(max_length=100, description='籍贯')
    stu_university: str = fields.CharField(max_length=100, description='院校')
    stu_major: str = fields.CharField(max_length=100, description='专业')
    stu_start_time: str = fields.CharField(max_length=100, description='入学时间')
    stu_end_time: str = fields.CharField(max_length=100, description='毕业时间')
    stu_major_level: str = fields.CharField(max_length=100, description='学历')
    stu_hr_id: int = fields.IntField(description='顾问编号')
    stu_age: int = fields.IntField(description='年龄')
    stu_gender: str = fields.CharField(max_length=100, description='性别')


class Score(models.Model):
    stu_id: int = fields.ForeignKeyField('models.Stu_Info' ,related_name='score')
    test_time: int = fields.IntField(description='考核序次')
    stu_grade: float = fields.FloatField(description='成绩')


class Job(models.Model):
    stu_id: int = fields.ForeignKeyField('models.Stu_Info' ,related_name='job')
    open_time: str = fields.CharField(max_length=100, description='就业开放时间')
    offer_time: str = fields.CharField(max_length=100, description='offer下发时间')
    company_name: str = fields.CharField(max_length=100, description='就业公司名称')
    salary: int = fields.IntField(description='就业薪资')
